<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<meta name="description" content="">
<meta name="author" content="">

<title>商品详情</title>

<!-- 新 Bootstrap 核心 CSS 文件 -->
<link
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>



<link rel="stylesheet" href="/market/css/products.css">
<link rel="stylesheet" href="/market/css/main_css.css">


</head>

<body>

	<%@include file="navbar.jsp"%>


	<!-- 左右分布 -->
	<div class="container-fluid">

		<c:set value="${seller_lists.get(0)}" var="g_first"></c:set>
		<c:set value="${g_first.user}" var="user"></c:set>



		<div class="row " style="padding-top: 30px" >
				<h1 class="page-header myfont" style="margin-left: 10px;">卖家介绍</h1>
				<div class="col-md-offset-1 col-sm-2 col-xs-6" style="padding-top: 10px">

					<c:if test="${user.headPic==null}">
						<img  class=" img-responsive " alt="detail_img_left1"
							  src="/market/images/kj.png" width="150px" height="150px">
					</c:if>

					<c:if test="${user.headPic!=null}">
						<img src="showGoodsPic?goodsImg=${goods_details.goods_img}&userid=${goods_details.user.userid}"
							 class=" img-responsive " alt="detail_img_left2" width="150px" height="150px">
					</c:if>

				</div>

				<div class=" col-sm-4 col-xs-6 ">
					<table class="table" border="0">

						<tr>
							<td>卖家: <span class="price_font" style="color: #3c3c3c">${user.nickname}</span></td>
						</tr>
						<tr>
							<td style="border: none;">信誉指数：<span  class="infos_font">${user.credit} </span></td>
						</tr>

						<tr>
							<td style="border: none;">联系方式：<span  class="infos_font"> ${user.username}</span></td>
						</tr>

						<tr>
							<td style="border: none;">
								<a data-toggle="modal" data-target="#sellerModal"
								   class="btn btn-default" style="border-color: blue; margin-top: 10px;width: 40%"
								   onclick="value_s(${user.userid})">
									评价卖家</a>
							</td>
						</tr>
					</table>
				</div>

				<%--留言模块--%>
				<div class=" col-sm-4 col-xs-10 ">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">
								留言板
							</h3>
						</div>
						<div class="panel-body">
							<textarea rows="4" cols="50" style="padding-left: 10px"></textarea>

						</div>
						<div class="panel-footer">
							<div class="row">
								<div class="col-sm-9 col-xs-8">
									<input type="text" name="toseller" id="toseller"
										   class="form-control" >
								</div>
								<div class="col-sm-2 col-xs-3">
									<button class="btn btn-primary btn-sm">发送</button>

								</div>

							</div>

						</div>
					</div>

				</div>

		</div>


			<div class="row" >
				<div >

					<!-- 商品展示 -->
					<h1 class="page-header myfont" style="margin-left: 10px;">卖家发布商品</h1>


					<div class="row " >

						<c:forEach items="${seller_lists}" var="goods">

							<div class="panel panel-default col-xs-5 col-sm-2 productItem"  >
								<div class="panel-body">

									<div class="row" >
										<a href="goods_details?goodsId=${goods.goods_id}">
											<img alt="img_detail" src="${goods.goods_img}" class="  img-responsive"
												 style="width: 190px; height: 190px;">
										</a>
										<p class="productPriceEm" >¥${goods.goods_price}</p>
										<p class="productFont"><small>${goods.goods_name}</small></p>
										<a>${goods.user.nickname}</a>
										<small style="margin-left: 10px">${goods.trade_place}</small>
									</div>

								</div>
							</div>

						</c:forEach>
					</div>


				</div>
			</div>

	</div>




	<!-- 模态框（Modal） -->
	<div class="modal fade" id="sellerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
					</button>
					<h4 class="modal-title" id="myModalLabel">
						对卖家评价：
					</h4>
				</div>
				<div class="modal-body">
					<input type="hidden" id="seller_id" name="seller_id" value="">
					<form id="credit">
						<div class="form-group">
						<big>
							<input type="radio" value="1" name="u_credit" >十分满意，好评٩(๑>◡<๑)۶
							<br/><br/>
							<input type="radio" value="-1" name="u_credit" >不开心，差评(╬￣皿￣)=○
						</big>
						</div>
					</form>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">
						关闭
					</button>
					<button type="button" class="btn btn-primary" onclick="modifyCredit()">
						提交
					</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->

	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

	<script type="text/javascript" src="/market/js/seller.js"></script>
	<script src="/market/js/common.js"></script>
</body>
</html>